package com.example.demo.Service;

import com.example.demo.Dao.BookDao;
import com.example.demo.Model.Book;

import java.util.ArrayList;
import java.util.List;

public class BookService {
    public List<Book> getList() {
        List<Book> list = new BookDao().mockDate();
        for(Book book: list) {
            if(book.getStatus() == 1) {
                book.setStatusCN("可借阅");
            }else {
                book.setStatusCN("不可借阅");
            }
        }
        return list;
    }
}
